package com.learning.rpc.remoting;

/**
 * ClassName: Handler
 * Description: 处理器，由具体的协议去实现
 * Date: 2022/5/10 23:41 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public interface Handler {

    /**
     * 读取数据
     *
     * @param channel
     * @param message
     * @throws Exception
     */
    void onReceive(RpcChannel channel, Object message) throws Exception;

    /**
     * 写出数据
     *
     * @param channel
     * @param message
     * @throws Exception
     */
    void onWrite(RpcChannel channel, Object message) throws Exception;
}
